{"version":3,"file":"pin.min.js","sources":["pin.js"],"names":["BX","namespace","Main","pin","container","this","defaultOptions","pinTop","dataKey","defaultValue","pinBottom","pinClass","pinTopClass","pinBottomClass","pinUseControll","pinControllClass","pinControllPinClass","pinControllUnpinClass","offsetTop","offsetBottom","idPrefix","useOuterWidth","useInnerWidth","niceAttachment","settings","controll","cache","init","prototype","prepareSettings","makeControll","bindOnClickControll","adjustPosition","bindOnScrollWindow","bindOnResizeWindow","optionsKeys","Object","keys","result","dataValue","self","forEach","current","data","className","getUserPinState","join","create","props","appendChild","bind","delegate","_onClickControll","window","_onScroll","_onResize","getScrollTopPosition","scrollTop","getParentRect","pos","parentNode","getContainerRect","getCache","setCache","getContainerWidth","width","setContainerWidth","key","value","getStyleProperty","property","selector","sheets","document","styleSheets","i","l","length","sheet","cssRules","j","k","rule","selectorText","split","indexOf","style","replace","offset","resultVal","currentOffset","propName","currentWidth","getParentWidth","containerHeight","parseFloat","addClass","height","fake","opacity","insertBefore","unpin","remove","removeClass","removeAttribute","containerRect","top","isPinned","bottom","hasClass","getId","type","isNotEmptyString","id","setUserPinState","localStorage","setItem","JSON","stringify","parse","getItem","paddingLeft","paddingRight","outerWidthContainer","innerWidthContainer","findParent","class","event","pinContainers","findChild","map"],"mappings":"AAAAA,GAAGC,UAAU,UAEb,UAAWD,IAAGE,KAAQ,MAAM,YAC5B,CAECF,GAAGE,KAAKC,IAAM,SAASC,GAEtBC,KAAKD,UAAYA,CACjBC,MAAKC,gBACJC,QACCC,QAAS,UACTC,aAAc,OAEfC,WACCF,QAAS,aACTC,aAAc,OAEfE,UACCH,QAAS,YACTC,aAAc,aAEfG,aACCJ,QAAS,gBACTC,aAAc,iBAEfI,gBACCL,QAAS,mBACTC,aAAc,oBAEfK,gBACCN,QAAS,mBACTC,aAAc,OAEfM,kBACCP,QAAS,qBACTC,aAAc,mBAEfO,qBACCR,QAAS,yBACTC,aAAc,uBAEfQ,uBACCT,QAAS,2BACTC,aAAc,yBAEfS,WACCV,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